package com.atguigu.petstore.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 商城-评论表
 * @TableName shop_comment
 */
@TableName(value ="shop_comment")
@Data
public class ShopComment implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 会员id
     */
    @TableField(value = "member_id")
    private Long memberId;

    /**
     * 评论内容
     */
    @TableField(value = "comment")
    private String comment;

    /**
     * 父评论id
     */
    @TableField(value = "p_id")
    private Long pId;

    /**
     * 评价的商品id
     */
    @TableField(value = "product_id")
    private Long productId;

    /**
     * 评价星级（1-5星）
     */
    @TableField(value = "star_level")
    private Integer starLevel;

    /**
     * 创建时间
     */
    @TableField(value = "creat_time")
    private Date creatTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;





    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", memberId=").append(memberId);
        sb.append(", comment=").append(comment);
        sb.append(", pId=").append(pId);
        sb.append(", productId=").append(productId);
        sb.append(", starLevel=").append(starLevel);
        sb.append(", creatTime=").append(creatTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}